f = open('demo.txt', 'r', encoding='utf-8')

count = 0
for line in f:
    count += 1
    print(line, end='')
    if count == 10:
        break

f.close()